package com.find.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.find.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author kai
 */
@Mapper
public interface UserDao extends BaseMapper<User> {

    @Update("update user set user_login=1 where user_name=#{name}")
    boolean login(String name);

    @Update("update user set user_login=0 where user_id=#{id}")
    boolean logout(int id);

}
